{% extends "base.html" %}
{% block title %}{{name}} details{% endblock %}
{% block content %}
    <article id="main" class="markdown-section">
	<h1>{{name.title()}}</h1>
        <h3>Posts</h3>
        <table id="table" class="table" style="display:table; table-layout:auto; width:100%">
          <thead>
            <tr>
                <th style="width:20%"> Date </th>
                <th style="word-break:break-all"> Content </th>
                <th style="width:10%"> Media </th>
            </tr>
          </thead>
          <tbody>
            {% for entry in posts %}
                <tr>
                    <td><center> {{entry.split('+')[0].replace('T',' ')}} </center></td>
                    <td style="word-break:break-all"> {{posts[entry]['message']}} </td>
                    <td>
                    {% for media in posts[entry]['image'] %}
                        <a href="/screenshots/telegram/img/{{name}}-{{media|urlencode}}.jpg" rel="noopener noreferrer" target="_blank"">Images</a>
                    {% endfor %}
                    </td>
                </tr>
            {% endfor %}
          </tbody>
        </table>
    </article>
{% endblock %}
